window.onload = function(){
    var divs = document.getElementsByClassName('box2div')
    var ul2s = document.getElementsByClassName('ul2s')
    for(let i = 0 ; i < divs.length ; i++){
        divs[i].onclick = function(){
            divs[i].lastElementChild.style.display="block";
        }
        ul2s[i].onmouseover = function(){
            divs[i].lastElementChild.style.display="block";
        }
        ul2s[i].onmouseout = function(){
            divs[i].lastElementChild.style.display="none";
        }
        divs[i].onmouseout = function(){
            divs[i].lastElementChild.style.display="none";
        }
    }
}